安装php
1 | ./configure --prefix=/home/php5.6 --enable-fpm --with-png-dir --with-gd --enable-gd-native-ttf |
##nginx 安装1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18#./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module //后面为 https 模块
.....
#/usr/local/nginx/sbin/nginx
打开浏览器 http://localhost
Welcome to nginx! 安装成功
nginx 支持 php
#vi /usr/local/nginx/conf/nginx.conf
把以下取消注释
location ~ .php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script_name;
include fastcgi_params;
}
重启 nginx
#pkill -9 nginx
#/usr/local/nginx/sbin/nginx